#ifndef EJSIDEBAR_H
#define EJSIDEBAR_H

#include <QWidget>
#include <QAction>
#include <QIcon>


class EjSideBar : public QWidget
{
    Q_OBJECT
public:
    EjSideBar(QWidget * parent = 0);

    void addAction(QAction *action);
    QAction *addAction(const QString &text, const QIcon &icon = QIcon());
protected:
    void paintEvent(QPaintEvent *event);
    void mousePressEvent(QMouseEvent *event);
    void mouseReleaseEvent(QMouseEvent *event);
    QSize minimumSizeHint() const;

    QAction* actionAt(const QPoint &at);
private:
    QList<QAction*> m_actions;
    QAction *m_pressedAction;
    QAction *m_checkedAction;

    int action_height= 90;
};

#endif // EJSIDEBAR_H
